// Copyright personal possession of Nguyen Minh Kha
// Datetime: 10:47AM 10/28/2011
// Discription: This object manage all collisionable object in game.
// Licencse: Free source
// Version: 1.0
// Writer: Nguyen Minh Kha

/* Google opensource coding standard with variable name exception */

#ifndef GAMEFRAMEWORK_COLLISIONABLE_MANAGER_H_
#define GAMEFRAMEWORK_COLLISIONABLE_MANAGER_H_

#include <Windows.h>

#include "collisionable_object.h"


class CollisionableManager {
  
  /* Struct */
private:
  struct List {
    CollisionableObject *object;
    struct List* pNext;
  };

  /*Static*/
  static CollisionableManager* thisPointer;
public:
  static CollisionableManager* getInstance() {
    return CollisionableManager::thisPointer;}
  /* Constructor; Destructor */
public:
  CollisionableManager(void);
  ~CollisionableManager(void);

  /* Methods */
public:
  void Add(CollisionableObject *object);
  void Delete(CollisionableObject *object);
  void RemoveAll();

  /* Token function */

  void DoCollision(CollisionableObject* collisionedObject);
  void Threading();

private:
  List* pHead;
};

#endif // GAMEFRAMEWORK_COLLISIONABLE_MANAGER_H_